1. Field of the Invention
The present general inventive concept relates to a high-speed binary image compression method, and more particularly to a high-speed binary image compression method to detect and code blocks having continuously identical pixel values, block by block.
2. Description of the Related Art
There are a variety of binary image compression methods including a binary image compression method applied to the Joint Bi-level image expert group (JBIG). Existing still image coding methods contain Modified Huffman coding for one-dimensional coding, Modified READ coding for two-dimensional coding, etc., which are used for facsimile or hard-copy communications. However, these methods are not suitable for soft-copy transmissions for displaying images on a screen in applications such as image database searches performed by computers, video conferencing, etc. Therefore, JBIG was organized in the year of 1988 for standardization of coding schemes commonly available for the soft-copy and hard-copy communications, and was established in 1993.
A JBIG scheme enables hierarchical coding transmissions by first coding and transmitting a lowest-resolution image to enable users to know schematic content and then progressively increasing a resolution of the image. Further, the JBIG scheme can speed up search functions since it enables a wide range of resolutions to be displayed and enables direct searches to be performed based on reduced images on search systems.
FIG. 1 is a flow chart schematically illustrating a conventional binary image compression method.
In FIG. 1, a current pixel value PIX of a current pixel and an estimation value MPS of the current pixel calculated based on a context are compared (S111). The context is based on pixels around the current pixel, and the estimation value MPS can be calculated based on the context. That is, a context for certain pixels is calculated in advance, and a value of a pixel at which there exists an identical context value can be estimated as the value of the current pixel.
Further, values for ST, MPS, LPS, LPZ, NMPS, NLPS, etc., illustrated in FIG. 1, are calculated and stored in advance. MPS represents a value estimated in probability as a more probable symbol that corresponds to the estimation value of the current pixel, LPS represents a value opposite to a value estimated in probability as a less probable symbol, ST represents a state in a probability table, and LPZ represents a probability value of LPS. Further, NMPS represents a value indicating a next state when the estimation value MPS is right (i.e., MPS=PIX), and NLPS represents a value indicating a next state when the estimation value MPS is wrong (i.e., MPS does not equal PIX). Here, the values of MPS and LPS can vary depending on a value of SWITCH, which is a variable used in the compression method of FIG. 1.
In detail, out of black pixels, MPS represents a symbol with a black-pixel occurrence probability higher than 50%, if black MPS is set to 1 and white MPS is set to 0. ST is a value allocated based on the context, for which MPS and the current pixel substantially occurring are compared for probability estimation, a mapping probability value is obtained from a probability table, and a position for movement to a next state is stored in ST.
Variables A and C are compared with the stored values of ST, MPS, LPS, LPZ, NMPS, NLPS, etc., so that an execution routine is determined through conditional branching. Here, the variable A represents a probability interval register, and the variable C represents a variable keeping track of a code register pointing to a base of an interval of a symbol to occur. A compression rate is enhanced as an estimation value of MPS is closer to an actual pixel value. A code word C becomes identical as the estimation value of MPS is much closer to the actual pixel value, so coding data becomes reduced.
If the current pixel value PIX is the same as the estimation value of MPS of the current pixel in S111, S113 to S121 are executed for coding of the current pixel, and if the current pixel value is different from the estimation value of MPS of the current pixel, S123 to S133 are executed for coding of the current pixel.
If the current pixel value PIX is the same as the estimation value MPS of the current pixel, a new probability interval register A is calculated, and if the new probability interval register A is smaller than a certain size (0X8000), the new probability interval register A is re-adjusted and a compression result is output. However, if the current pixel value PIX is different from the estimation value MPS of the current pixel, the code register C pointing to the base of the interval of the symbol to occur is newly calculated, the registers A and C are re-adjusted, and the compression result is output.
The JBIG compression method described above has a slow execution speed due to pixel-by-pixel calculations. Therefore, a method is required to increase a compression speed by processing the repeated parts of images such as black spaces at one time.